<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>跨域和JSONP</title>
		<style type="text/css"></style>
		<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
	</head>
	<body>
		<script type="text/javascript">
			/*
			 【1】跨域:
			 【2】跨域操作
			     -->JSONP: 
				 -->CORS:
			 */
			//-->JSONP
			function getData(data){
				console.log(data);
			}
			
			var script = document.createElement("script");
			script.id = "jsonp";
			script.src = "jsonp.js";
			document.body.appendChild(script);
		</script>
	</body>
</html>
